<template>
 <div class='test-table-tree'>
   <table-tree :column="tableColumn" :data="tableData" :showPage="true"></table-tree>
 </div>
</template>

<script>
import TableTree from '@/components/TableTree/TableTree'
export default {
  components: {
    TableTree
  },
  data () {
    return {
      tableColumn: [
        {
          title: '展开',
          key: 'expand'
        },
        {
          title: '姓名',
          key: 'name'
        },
        {
          title: '性别',
          key: 'sex'
        },
        {
          title: '年龄',
          key: 'age'
        },
        {
          title: '手机号',
          key: 'telephone'
        }
      ],
      tableData: [
        {
          value: {
            name: '张三',
            sex: '男',
            age: '20',
            telephone: '13200000000'
          },
          children: [
            {
              value: {
                name: '张三儿',
                sex: '男',
                age: '2',
                telephone: '13200000000'
              }
            }
          ]
        },
        {
          value: {
            name: '李四',
            sex: '女',
            age: '18',
            telephone: '13200000000'
          }
        }
      ]
    }
  },
  computed: {

  },
  watch: {

  },
  methods: {

  },
  created () {

  }
}
</script>

<style scoped>
.test-table-tree {
  width: 500px;
  height: 400px;
  margin: 20px auto;
}

</style>
